﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net.Appender;

namespace waveform_test.ext
{
    public class MemoryAppenderWithEvents : MemoryAppender 
    {
        public event EventHandler Updated;

        protected override void Append(log4net.Core.LoggingEvent loggingEvent)
        {
            // Append Event
            base.Append(loggingEvent);

            // Alert Updated event
            var handler = Updated;
            if (handler != null)
                handler(this, new EventArgs());
        }
    }
}
